package com.csjbot.weedle_auto.file.constants_util


import android.os.Environment

/**
 * 常量的设置
 * Created by chenqi on 2016/7/23 0023.
 */
class Constants {

    object Path {
        var path = ""//未添加路径
    }

    object TextShow {
        val TS_TEXT = "squirtle.ts_text"//
        val SET_TEXT = "squirtle.set_text"
    }

    object SpeachAction {
        val SA_TUCH = "squirtle.sa_tuch"//触摸传感器
        val SA_TEXT = "squirtle.sa_text"//唤醒之后以及所有回答的话
        val SA_SHOWTEXT = "squirtle.sa_showtext"//显示csj

        val SA_BEGIN = "squirtle.sa_begin"//开始
        val SA_BACK = "squirtle.sa_back"//回来
        val SA_CMODEL = "squirtle.sa_cmodel"
        val SA_STARSCORE_OVER = "squirtle.sa_starscore_over"//打分完成
        val SA_ACTIONSTATE = "squirle.sa_actionState"//根据桌号和菜号判断
        val SA_POWER = "squirle.sa_power"//获取到电量
    }

    object Keywords {
        val KEY_ACITONARRIVE = "actionarrive"
        val KEY_GETAGENT = "getagent"//获取agent中的值
    }

    object state {
        val NORMALWEIGHT = 2//正常重量
        val sendState = "sendState"//送菜状态
        val arriveState = "arriveState"//等待顾客反应状态
        val backState = "backState"//返回时的状态
        val waitState = "waitState"//送菜前的等待状态
        val error = "error"//错误
        val WELCOME = "welcome"
        val SEND = "send"

    }

    //循环模式
    object CircleMode {
        val SIGNLEMODE = "signleMode"//单曲循环
        val LISTMODE = "listMode"//列表循环
    }

    //文件类型（音频视频）
    object FileType {
        val AUDIO = "audio"//音频
        val VIDEO = "video"//视频
    }

    object Type_UP {
        val SCR_PC = 0x15.toByte()
        val REF_CMD = 0x80.toByte()
        val RESET = 0x01.toByte()
        val RESETWEIGHT = 0x02.toByte()
        val RESET_DATALEN = 0x00.toByte()
        val FACE = 0x02.toByte()
        val FACE_DATALEN = 0x01.toByte()

    }

    object Type_DOWN {
        val SCR_SLAVE = 0x51.toByte()
        val REF_ACK = 0x00.toByte()
        val WAKEUP = 0x80.toByte()

        val TOUCH = 0x21.toByte()
        val TOUCH_CMD = 0x09.toByte()
        val GRAVITY = 0x81.toByte()
        val OA = 0x82.toByte()
        val FAULT = 0xFF.toByte()
    }

    object SpeechCommand {
        val SP_ONE = 1//招牌菜
        val SP_TWO = 2//普通菜
    }

    object Location {
        val ACTION = 10001//送菜等待位置
        val WELCOME = 10002//迎宾等待位置
    }

    object Times {
        val times = 10000//十秒
    }

    companion object {
        /**
         * 选中radiobutton之后的信息
         */
        val CHECKINFOR = "checkinfor"//串口数据
        val SLAMSTATIONBEAN = "station"//slam数据
        val OTHER_INFOR = "inforother"
        val ALLINFOR = "infor"//slam数据+串口数据

        val AllIntent = "squirtle.sa_allIntent"//所有广播
        val VideoIntent = "squirtle.sa_v"//video 广播
        var STATESPEEK = false//判断是否播报本地语音状态
        var STATETTS = false//判断人机对话时是否没有说完
        val SLAM_IP = "192.168.11.1"//思岚ip
        val SLAM_PORT = 1445//思岚port
        var IS_VIDEO = false//是否是视频广告播放
        var POWER = true//电量是否电量过低
        var ISCHARGING = false//是否正在充电
        var POWERISSHOW = true//
        var IS_CONNECT = false//是否连接上了
        var WAIT_TIME = 10//等待时间的默认值
        var IS_NOT_SPEEK_OVER = true//录音是否已经结束
        val CUSTOM_FILEPATH = FileUtil.innerSDCardPath + "/csjbot/custom/"//循环送餐文件复制到的路径
        val DISH_IMAGE_PATH = FileUtil.innerSDCardPath + "/csjbot/dishpic/"//菜品图片存放路径
        val DISH_AUDIO_VIDEO_PATH = FileUtil.innerSDCardPath + "/csjbot/video/"//音视频文件存放路径
        val SDCARD_VIDEO_PATH = FileUtil.innerSDCardPath + "/csjbot/sendrecord/"//送餐录像存放路径
        val SDCARD_FACE_PATH = FileUtil.innerSDCardPath + "/csjbot/face/"//人脸识别存放路径

        var WAIT_TIME_TOAST = 3000//Toast显示时间
        val DIALOG_SHOW_INTVER = (10 * 60 * 1000).toLong()//每隔10分钟提醒一次电量低
        var ISLAUNCHACTIVITY = true

        var CIRCLE_DESK_NUMBER = 0

        var SDIR = "/sdcard"

        var path = Environment.getExternalStorageDirectory().toString() + "/map.map"//地图保存位置


        var ACTION_NOT_OVER = true//判断行动是否结束

        var SEND_FOOD = false//判断是否在送餐

        var IS_TUCH = false//判断是否摸手了
        //写一个判断是否正在行动中
        var IS_ACTON = true

        val DATA_CODE = 0//判断串口出来的data是否为0
        val DATA_CODE_1 = 1//判断串口出来的data是否为1
        var IS_MORE = true//判断是否是第一次工作

        val ROBOT_MAX_SPEED = "0.7"//机器人最大速度
        val ROBOT_MIN_SPEED = "0.1"//机器人最小速度
        val ROBOT_STEP_SPEED = "0.05"//机器人步进速度
        val ROBOT_RISK_SPEED = "0.6"//机器人风险速度
        val ROBOT_DEFAULT_SPEED = "0.4"//机器人默认速度

        val ROBOT_DISH_PRICE_FORMAT = "######0.00"

        var numer = 0
    }
}
